package com.douyuehan.doubao.wechatpay.model.entity;

import lombok.Data;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Timestamp;

@Data
@Entity
@Table(name = "kp_customers")
public class Customers {

    @Id
    @Column(name = "id")
    private long id;

    @Column(name = "manager_id")
    private long managerId;

    @Column(name = "project_id")
    private long projectId;

    @Column(name = "id_card")
    private String idCard;

    @Column(name = "customer_name")
    private String customerName;

    @Column(name = "customer_phone")
    private String customerPhone;

    @Column(name = "customer_house")
    private String customerHouse;

    @Column(name = "intention_index")
    private Integer intentionIndex;

    @Column(name = "customer_code")
    private String customerCode;

    //	是否抢购成功    1是   0不是
    @Column(name = "is_snap_up")
    private Integer isSnapUp;

    @Column(name = "pay_money")
    private BigDecimal payMoney;

    @Column(name = "pay_number")
    private String payNumber;

    @Column(name = "pay_out_trade_no")
    private String payOutTradeNo;

    @Column(name = "pay_time")
    private Timestamp payTime;

    @Column(name = "is_deleted")
    private Integer isDeleted;

    @Column(name = "add_time")
    private Timestamp addTime;

    @Column(name = "kp_status1")
    private String currentStatus;

    @Column(name = "kp_status2")
    private String nextStatus;

    @Column(name = "kp_tag")
    private Integer kpTag;

    @Column(name = "lucky_batch_no")
    private Integer luckyBatchNo;

    @PrePersist
    private void onCreate() {
        this.addTime = new Timestamp(System.currentTimeMillis());
    }
}
